package ua.kpi.apolonov.factories;

import java.io.Serializable;
import java.util.List;
import ua.kpi.apolonov.answers.Answer;
import ua.kpi.apolonov.questions.MultipleAnswersQuestion;
import ua.kpi.apolonov.questions.Question;
import ua.kpi.apolonov.questions.RangeAnswerQuestion;
import ua.kpi.apolonov.questions.SingleAnswerQuestion;
import ua.kpi.apolonov.questions.TextAnswerQuestion;
import ua.kpi.apolonov.questions.YesNoQuestion;

/**
 * @version 2.0 18.03.2013
 * @author Yegor Apolonov
 */

public class ConcreteQuestionTypeFactory implements Serializable {

	public Question createSingleQuestionType(String question, List<Answer> answers) {
		return new SingleAnswerQuestion(question, answers);
	}

	public Question createMultipleQuestionType(String question, List<Answer> answers) {
		return new MultipleAnswersQuestion(question, answers);
	}

	public Question createYesNoQuestionType(String question, List<Answer> answers) {
		return new YesNoQuestion(question, answers);
	}

	public Question createRangeQuestionType(String question, List<Answer> answers) {
		return new RangeAnswerQuestion(question, answers);
	}

	public Question createTextQuestionType(String question, List<Answer> answers) {
		return new TextAnswerQuestion(question, answers);
	}
	
}
